package com.bizmda.bizsip.sample.source.controller;

import cn.hutool.json.JSONObject;
import com.bizmda.bizsip.common.BizException;
import com.bizmda.bizsip.common.BizMessage;
import com.bizmda.bizsip.common.BizMessageInterface;
import com.bizmda.bizsip.common.BizUtils;
import com.bizmda.bizsip.converter.Converter;
import com.bizmda.bizsip.sample.sink.api.HelloInterface;
import com.bizmda.bizsip.source.api.SourceClientFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;

/**
 * @author 史正烨
 */
@Controller
public class HelloSourceController {
    private HelloInterface helloInterface = SourceClientFactory
            .getAppServiceClient(HelloInterface.class,"/bean/hello");

    @GetMapping(value = "/hello")
    @ResponseBody
    public String doService(String message) {
        return this.helloInterface.hello(message);
    }
}